<?php

use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class DeleteGoodsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('goods', function (Blueprint $table) {
            schema::drop('goods');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::create('goods', function (Blueprint $table) {
            $table->increments('gid');
            $table->string('goods_name')->defaule('');
            $table->integer('cat_id')->unsigned()->default(0);
            $table->integer('shop_price')->unsigned()->default(0);
            $table->integer('market_price')->unsigned()->default(0);
            $table->tinyinteger('is_hot')->unsigned()->default(0);
            $table->tinyinteger('is_new')->unsigned()->default(0);
            $table->tinyinteger('is_best')->unsigned()->default(0);
            $table->string('thumb_img');
            $table->string('goods_img');
            $table->string('ori_img');
            $table->integer('pubtime');
            $table->integer('com_num')->default(0);
            $table->tinyinteger('status')->default(0);
        });
    }
}
